﻿using System;
using WindowsGame.Library.IoC;

namespace WindowsGame
{
	/// <summary>
	/// GameFactory is responsible for constructing the GameManager.
	/// </summary>
	public static class GameFactory
	{
		private static IGameManager gameManager;

		public static IGameManager GetGameManager()
		{
			return gameManager ?? (gameManager = IoCContainer.Resolve<IGameManager>());
		}

		public static void Release()
		{
			IoCContainer.Release();
		}
	}
}